<html>
    <meta charset="utf-8"/>
    <head>
        <title>已面试信息</title>
        <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    </head>
    <body style="text-align:center;">
    <!--
        <script>
            function c_self(){
                window.location.href='mianshi.html';
                return false;
            }

            function c_all(){
                window.location.href='all.php';
                return false;
            }
            function c_class{
                window.location.href='class.php';
            }
        </script>
     -->

         <a href="all.php"> <button>所有面试历史记录</button> </a>
         <a href="mianshi.html"> <button>添加面试记录</button></a>
            <form action="class.php">
                <select name="n_class">
                    <option>class5</option>
                    <option>class6</option>
                    <option>class7</option>
                </select>
                <button onclick="c_class()">查询</button>
            </form>
        <table border="1" class="table table-striped">
            <tr>
                <th>序号</th>
                <th>学生姓名</th>
                <th>公司名称</th>
                <th>面试时间</th>
                <th>面试重点</th>
            </tr>

            <?php
                include('huihua.php');
                echo  '<h1 style="text-align:center;">';
                echo $_SESSION['sname']." 面试单位统计表";
                echo "</h1>";
                //var_dump(empty($_SESSION[name]));
                include('db-conn.php');
                $c_list="select * from jiuye.company where name='$_SESSION[sname]';";
                //mysqli_error(mysqli_query($conn,$c_list));
                $result=mysqli_query($conn,$c_list);
                while($row = mysqli_fetch_assoc($result)){
                  echo "<tr>";
                      foreach($row as $key => $value){ 
                          echo "<td>$value</td>"; 
                      }
                  echo "</tr>";
                  
              }     
            ?>
            
        </table>
        
    </body>
</html>